<!DOCTYPE html>
<html lang="zh" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<th:block th:fragment="article(title,avatar,name)">
    <header class="site-header" role="banner">
        <div class="site-top">
            <div class="site-branding">
                <h1 class="site-title"><a th:href="@{/}">[[${title}]]</a></h1>
                <!-- logo end -->
            </div><!-- .site-branding -->
            <div class="header-user-avatar">
                <img th:src="${avatar}" width="30" height="30">
                <div class="header-user-menu">
                    <div class="herder-user-name">
                        <div class="herder-user-name-u">[[${name}]]</div>
                    </div>
                </div>
            </div>
            <div class="searchbox"><i class="iconfont js-toggle-search iconsearch icon-search"></i></div>
            <div class="lower-cantiner">
                <div class="lower">
                    <nav class="navbar">
                        <ul id="menu-menu-1" class="menu">
                            <li>
                                <a th:href="@{/}" target="_self">
                                    <span class="faa-parent animated-hover">
                                        首页
                                    </span>
                                </a>
                            </li>

                            <li th:if="${session.user}" >
                                <a th:href="@{|/about/${session.user.id}|}" target="_self">
                                    <span class="faa-parent animated-hover">
                                        关于页面
                                    </span>
                                </a>
                            </li>
                            <li th:unless="${session.user}" >
                                <a th:href="@{|/about/${author.id}|}" target="_self">
                                    <span class="faa-parent animated-hover">
                                        关于页面
                                    </span>
                                </a>
                            </li>

                        </ul>
                    </nav>
                </div>
            </div>
        </div>
    </header>
</th:block>

<th:block th:fragment="article-bg(title,img,avatar,name,userUrl,time)">
    <div class="pattern-center-blank"></div>
    <div class="pattern-center single-center">
        <div class="pattern-attachment-img">
            <img th:src="${img}" data-srcset="http://api.lixingyong.com/api/images?postid=3&type=url&itype=image&th=640 640w,
                            http://api.lixingyong.com/api/images?postid=3&type=url&itype=image&th=960 960w,
                            http://api.lixingyong.com/api/images?postid=3&type=url&itype=image&th=1280 1280w,
                            http://api.lixingyong.com/api/images?postid=3&type=url&itype=image 1440w" data-sizes="auto"  />
        </div>
        <header class="pattern-header single-header">
            <h1 class="entry-title">[[${title}]]</h1>
            <p class="entry-census">
                        <span>
                            <a th:href="${userUrl}">
                                <img th:src="${avatar}">
                            </a>
                        </span>
                <span>
                            <a th:href="${userUrl}">[[${name}]]</a>
                        </span>
                <span class="bull">·</span>[[${time}]]
                <span class="bull">·</span><span class="i18n" data-iname="post.visits" data-ivalue="37"></span>
            </p>
        </header>
    </div>
</th:block>

</body>
</html>